<template>
	<view>
		<view>
			<view
				class="message_box"
				v-for="(item, index) in outpatientList"
				:key="index"
			>
				<view class="message_name">
					<view
						><view class="titleName">项目名称：</view
						><text>{{ item.subItemName }}</text></view
					>
					<view
						><view class="titleName">项目代码：</view
						><text>{{ item.subItemCode }}</text></view
					>
					<view
						><view class="titleName">检验结果：</view
						><text>{{ item.result }}</text></view
					>
					<view
						><view class="titleName" :style="{ color: item.colour }"
							>参考值范围：</view
						><text :style="{ color: item.colour }">{{
							item.referenceRange
						}}</text></view
					>
					<view
						><view class="titleName">单位：</view
						><text>{{ item.itemUnit == '' ? '无' : item.itemUnit }}</text></view
					>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			outpatientList: [],
		}
	},
	onLoad(option) {
		console.log(JSON.parse(option.parameter))
		this.outpatientList = JSON.parse(option.parameter)
	},
}
</script>

<style lang="scss">
page {
	background-color: #f3f3f3;
}
.message_box {
	display: flex;
	padding: 20rpx;
	align-items: center;
	background: #fff;
	margin-bottom: 20px;
	border: 1rpx solid #dbdbdb;
	.message_name {
		flex: 1;
		font-size: 30rpx;
		view {
			.titleName {
				text-align: right;
				min-width: 200rpx;
				display: inline-block;
			}

			color: rgb(182, 182, 182);
			padding: 4px;
			test {
				color: #000;
				margin-left: 40rpx;
			}
		}
	}
}
</style>